<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>pdf模拟测试</title>
  <link href="//unpkg.com/layui@2.8.0/dist/css/layui.css" rel="stylesheet">
  <style>
    body {
      display: flex;
    }
    .container {
      width: 70%; /* 左侧占一半宽度 */
      padding: 20px;
      border: 1px solid #ccc;
    }


  </style>
</head>
<body>
<div class="container">
  <!-- 这里放你的原始内容 -->
  <div style="height: 80px">
    <h3>测试服务器ip： 223.70.139.221</h3>
    <h3>测试服务器端口： 8888;</h3>
    <hr>
  </div>
  <div class="layui-btn-container">
    <h3 style="color: red">``` 代理客户端签章-生成文档摘要（关键字定位为例）</h3><br>

    <!-- HTML部分 -->
    <form id="pdfForm"  enctype="multipart/form-data">
      <label>签名证书</label>
      <input type="text" name="ukeyCert"  value="MIIE0jCCA7qgAwIBAgIKGzAAAAAAAIcKozANBgkqhkiG9w0BAQUFADBSMQswCQYDVQQGEwJDTjENMAsGA1UECgwEQkpDQTEYMBYGA1UECwwPUHVibGljIFRydXN0IENBMRowGAYDVQQDDBFQdWJsaWMgVHJ1c3QgQ0EtMTAeFw0yMzA0MDIxNjAwMDBaFw0yNDEyMDMxNTU5NTlaMCExCzAJBgNVBAYTAkNOMRIwEAYDVQQDDAnnvZfmuIXmmagwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMJ6MqHZPXdb0cW4ZCL5740MXHBkdcBaIdAccx0SAetje1B1H99Cdc7U1MUtQXmxA8iDnMYpOp0ai4bJtwrnrzxGNYTEdBRyY22JL18G2qR+yhwSTgHNcL49py2qeZ7yKizyzqjckXhtkECQcaEG1BFtopdsxX9xIpBPMTHNJBeHAgMBAAGjggJdMIICWTAfBgNVHSMEGDAWgBSsO+yvDKNQDu+vr7RPbDvb0VfSiTAdBgNVHQ4EFgQUayeIhdSb3F56ETMtTXoa71dscLIwCwYDVR0PBAQDAgbAMIGvBgNVHR8EgacwgaQwbaBroGmkZzBlMQswCQYDVQQGEwJDTjENMAsGA1UECgwEQkpDQTEYMBYGA1UECwwPUHVibGljIFRydXN0IENBMRowGAYDVQQDDBFQdWJsaWMgVHJ1c3QgQ0EtMTERMA8GA1UEAxMIY2EzY3JsNDUwM6AxoC+GLWh0dHA6Ly9sZGFwLmJqY2Eub3JnLmNuL2NybC9wdGNhL2NhM2NybDQ1LmNybDAJBgNVHRMEAjAAMBEGCWCGSAGG+EIBAQQEAwIA/zAdBgUqVgsHAQQUU0Y0MTAyMjExOTk5MTExNjgwMzIwHQYFKlYLBwgEFFNGNDEwMjIxMTk5OTExMTY4MDMyMCAGCGCGSAGG+EQCBBRTRjQxMDIyMTE5OTkxMTE2ODAzMjAbBggqVoZIAYEwAQQPMTAyMDgwMDI3MDk5NDQ1MCUGCiqBHIbvMgIBBAEEFzJDQFNGNDEwMjIxMTk5OTExMTY4MDMyMCoGC2CGSAFlAwIBMAkKBBtodHRwOi8vYmpjYS5vcmcuY24vYmpjYS5jcnQwEwYFKlYVAQEECmVzbXMxMTExMTEwQAYDVR0gBDkwNzA1BgkqgRyG7zICAgEwKDAmBggrBgEFBQcCARYaaHR0cDovL3d3dy5iamNhLm9yZy5jbi9jcHMwEwYKKoEchu8yAgEBHgQFDAM1NDUwDQYJKoZIhvcNAQEFBQADggEBALKvIjYMj7K4On/Qs4BATKHQRlbmB0Ssp9eOMhF5sfW2BWmJekUy31go2omrwdu5b9yiQlkGYpSnr31DRWt4mH0+Z/C27dAhNWqMBdYXkgbJIKe6Mo85TP7aBH1mUQvnn+FAL9wgkD3Q0WrGQ1+wBU19qY15i34YyC/JbEyItVIfsPEV6iWH+7sKAoEZUiMMGVR4+jrGy8LEwwwXE9vyqyHUHTq/T4w2Cq/ivClmGVcY3rJ/lXKn2TWSbBvFM+v2wiJiGcttbUJNqizm4ZdFz31FYJhbiK2/B4gCVak6R7R+Nyhz34QROy04AQFDUfOE1wh2x3s18yO9gZhDsVKj/Zk=" id="ukeyCert" placeholder="" style="width: 300px" class="layui-input">
      <span>签章图片</span>
      <input type="text" name="s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gfWYddwqmk2/1RFaKjtkjKHws2FGx4uhRpHUyTfhqhQA/+8oLGN691CpgbGdVJ4p30MDSLOcsECVtHbOQKEqmeRnSSAGLdyhQb1eJX1mpsUJqMHovFRiwrPnQoyADe6iUSKa9IW8WAFG7iqpQAY7YhpPkAZEmHVASXrEm/OaLuGD8A0Yx91laQJry/+rNDK80ik0aKEbY4zn2QMjZrp64A8W5Om+BEET8aApIbACUjQ+/Hs3Vs1L5oXRzWe2vxxk6ArfG72XDFMjyqpa60PEy8fR08k4+YwqLWEptRBiBoQrdQaNWeESYqlK6e2FoVtTXjDUCkFdDAAgBKI+YQS2u3957g/t2Ay/18Chbcg40Wbxr73Y0QnVL7G6DFniH795X+SaTnctf5tDMTpY1zmrc3PS+G6hGrvkhr4JpgzjNmpJaW379ikgcMfWHgW3jkMfT4Ee+cgsUv7DAp5roSr8VA6vC3gvnG8aWqTmss26ziBquLMdr64VrNTEXyOqARBnHdGxENupZkUilnHz6qF3hipF90W4N6/PV2wcvKOafKoT04uXjoR/ioxqTfVSgkSBKgF541qZKsT2/HiAVQLhc7V2APSoehCVJ0d0HjyIUr0kOTIgwQMKBNzGOxwERfzpW6jVTDHe9gRAeN0x3grQM5UAoDxurEh97pAoeWmY+pgBgHQ9hhICH0GgJmWMQmbuIfTHyiDZ1IxSpa8YpYzKIOFrfIxS568YtgDKMVIwAAOw==" id="sealImg" placeholder="" style="width: 300px" class="layui-input">

      <span> 印章图片宽度</span>
      <input type="text" name="sealImgWide"  value="100" id="sealImgWide" placeholder="" style="width: 300px" class="layui-input">

      <span> 印章图片高度</span>
      <input type="text" name="sealImgHigh"  value="100" id="sealImgHigh" placeholder="" style="width: 300px" class="layui-input">

      <span> 印章移动类型</span>
      <input type="text" name="moveType"  value="3" id="moveType" placeholder="印章移动类型 1:重叠、2: 居下、3:居右,默认居右" style="width: 300px" class="layui-input">

      <span> 关键字</span>
      <input type="text" name="keyword"  value="北京" id="keyword" placeholder="关键字" style="width: 300px" class="layui-input">

      <span> 第几个关键字</span>
      <input type="text" name="searchOrder"  value="1" id="searchOrder" placeholder="" style="width: 300px" class="layui-input">

      <span> 上下偏移量</span>
      <input type="text" name="HeightMoveSize"  value="1" id="HeightMoveSize" placeholder="" style="width: 300px" class="layui-input">
      <span> 左右偏移量</span>
      <input type="text" name="MoveSize"  value="1" id="MoveSize" placeholder="" style="width: 300px" class="layui-input">

      <h3 style="color: red"> 拓展信息(颜色，字体，位置，后端已经设置）</h3>
      <input type="text" name="ExtendedInformation"  value="拓展信息" id="ExtendedInformation" placeholder="" style="width: 300px" class="layui-input">


      <span>选择pdf文件</span>
      <input type="file"  id="fileInput"  name="file" class="layui-btn demo-class-accept">
      <input type="button"  value="提交" id="submitButton" onclick="  check()" class="layui-btn demo-class-accept">

    </form>

    <div style="height: 80px">
      <!-- ... -->
    </div>
    <div class="layui-form">

      <hr class="ws-space-16">
      <textarea name="" id="myTextarea" placeholder="多行文本框" class="layui-textarea" style="height: 300px">
        </textarea>
    </div>
  </div>
</div>

<!-- JavaScript部分 -->
<script src="//unpkg.com/layui@2.8.0/dist/layui.js"></script>
<script src="https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js"></script>



<script>
  function check() {
    document.getElementById("myTextarea").value = "获取结果中......";
    var fileInput = $("#fileInput");


    if (fileInput.get(0).files.length === 0) {
      alert("未选择文件");
      return false;
    }

    var formData = new FormData($("#pdfForm")[0]);
    $.ajax({
      url: "/getPDFHashByKeywordgetExtendedInformation",
      type: "POST",
      data: formData,
      processData: false,
      contentType: false,
      success: function(response) {

        if(response.code==200){

          document.getElementById("myTextarea").value = response.map['statecode'];

        }
        else {
          layer.open({
            title: '提示',
            content:response.msg ,
          });
        }


      },
      error: function(xhr, status, error) {
        // Handle error response from the server
        alert("服务端错误: " + error);
      }
    });
  }








</script>


</body>
</html>